import {createRouter, createWebHistory} from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
//设置路由数组
const routes = [
    {
        path: '/',
        name: 'login',
        component: Login // 登录页
    },
    {
        path: '/home',
        name: 'home',
        component: Home // 主页
    }
]

const router = createRouter({
    history: createWebHistory(),
    mode:'history',
    routes
})

export default router